﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Omes.Model;
using Omes.Services;
using Page = Omes.Model.Page;

namespace FashionMural.Admin
{
    public partial class SystemInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Omes.Model.PageInfo pageInfo = new PageInfo();
                DbServer db = new DbServer();
                pageInfo = db.GetPageInfo();
                metakeyWord.Text = pageInfo.Meta;
                metaDescribe.Text = pageInfo.MetaDescribe;
                websiteTitle.Text = pageInfo.SiteTitle;
                websiteName.Text = pageInfo.SiteName;
                versionInfo.Text = pageInfo.VersionInfo;
            }
        }

        protected void savewebsiteinfo_Click(object sender, EventArgs e)
        {
            DbServer db = new DbServer();
            db.UpdatePageInfo(metakeyWord.Text, "", websiteTitle.Text, websiteName.Text, metaDescribe.Text,
                              versionInfo.Text);
        }
    }
}